/* 
    get 参数
    parse()方法 : 将字符串转化为对象
    format 参数 ：将对象转化为字符串 
*/


// const url = require('url');
// let let1 = 'www.baidu.com?name&password';
// let ret = url.parse(let1,true);
// console.log( ret.query.name );

/* const url = require('url');
let data = {
  protocol: null,
  slashes: null,
  auth: null,
  host: null,
  port: null,
  hostname: null,
  hash: null,
  search: '?name&password',
  query: { name: '', password: '' },
  pathname: 'www.baidu.com',
  path: 'www.baidu.com?name&password',
  href: 'www.baidu.com?name&password' 
};
let ret = url.format(data,true);
console.log(ret); */









